/***************************************************************
 *
 * (c) 2008 Markus Dittrich 
 *
 * This program is free software; you can redistribute it 
 * and/or modify it under the terms of the GNU General Public 
 * License Version 3 as published by the Free Software Foundation. 
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License Version 3 for more details.
 *
 * You should have received a copy of the GNU General Public 
 * License along with this program; if not, write to the Free 
 * Software Foundation, Inc., 59 Temple Place - Suite 330, 
 * Boston, MA 02111-1307, USA.
 *
 ****************************************************************/

#ifndef UTILITIES_TEST_H
#define UTILITIES_TEST_H

/* STL includes */
#include <string>
#include <vector>

/* Qt includes */
#include <QString>

/* local includes */
#include "../common_cppunit_headers.h"
#include "../../src/utilities.h"


/*****************************************************************
 *
 * test functionality in Utilities.cxx
 *
 *****************************************************************/
class UtilitiesTest : public CppUnit::TestFixture
{

CPPUNIT_TEST_SUITE( UtilitiesTest );
CPPUNIT_TEST( test_string_to_double_conversion );
CPPUNIT_TEST( test_strip_path );
CPPUNIT_TEST( test_data_max );
CPPUNIT_TEST( test_data_min );
CPPUNIT_TEST( test_data_mean );
CPPUNIT_TEST( test_data_variance );
CPPUNIT_TEST( test_data_stddev );
CPPUNIT_TEST_SUITE_END();


public:

  void setUp();
  void test_string_to_double_conversion();
  void test_strip_path();
  void test_data_max();
  void test_data_min();
  void test_data_mean();
  void test_data_variance();
  void test_data_stddev();


private:

  std::string doubleString1_;
  std::string doubleString2_;
  std::string doubleString3_;

  QString path1_;
  QString path2_;
  QString path3_;

  std::vector<double> dataArray1_;
  std::vector<double> dataArray2_;
  std::vector<double> dataArray3_;
  std::vector<int> dataArray4_;
};


/*****************************************************************
 * register test suite
 *****************************************************************/
CPPUNIT_TEST_SUITE_REGISTRATION( UtilitiesTest );


#endif
